package com.ayanami.departmentservice.service;

import com.ayanami.departmentservice.entity.TbDepartment;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author ayanami
 * @since 2020-07-28
 */
public interface TbDepartmentService extends IService<TbDepartment> {
    /**
     * 查询
     * @return 返回部门名称并计数
     */
    List<TbDepartment> findDeptAndCount();

    /**
     * 分页查询
     * @param page 分页对象
     * @param queryWrapper 查询条件
     * @return 返回部门与系主任名称并计数
     */
    IPage<TbDepartment> findDept(Page<TbDepartment> page,QueryWrapper<TbDepartment> queryWrapper);
}
